-- GENERATED SPELL FOR [Phantasmal Ogre] --


function spell0_27647(pUnit, Event) --@Bloodlust,n/a--
pUnit:FullCastSpellOnTarget(50730,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27647', 20338, 1)
end

function spell1_27647(pUnit, Event) --@Mace Smash,n/a--
pUnit:FullCastSpellOnTarget(50731,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27647', 2295, 1)
end

function Sorts_27647(pUnit, Event)
local choix_sorts_27647 = math.random(0, 1)
if choix_sorts_27647 == 0 then
pUnit:RegisterEvent('spell0_27647', 1, 1)
end
if choix_sorts_27647 == 1 then
pUnit:RegisterEvent('spell1_27647', 1, 1)
end
end

function mob27647_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27647', math.random(1500, 3000), 1)
end

function mob27647_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27647_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27647_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27647, 1, 'mob27647_Action')
RegisterUnitEvent(27647, 2, 'mob27647_Leave')
RegisterUnitEvent(27647, 3, 'mob27647_Kill')
RegisterUnitEvent(27647, 4, 'mob27647_Die')
